import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter);
const Home = () => import(/* webpackChunkName: "Home" */ "../views/home/home.vue");
const Category = () => import(/* webpackChunkName: "Category" */'../views/category/category.vue');
const Cart = () => import(/* webpackChunkName: "Cart" */'../views/cart/cart.vue');
const Profile = () => import(/* webpackChunkName: "Profile" */"../views/profile/profile.vue");
const routes = [
  {
    path: "",
    redirect: '/home',
  },
  {
    path: '/home',
    component: Home,
  },
  {
    path: '/category',
    component: Category,
  },
  {
    path: '/cart',
    component: Cart,
  },
  {
    path: '/profile',
    component: Profile,
  },
]

const router = new VueRouter({
  routes,
  mode: 'history'
})

export default router
